-- Run from the Shadow!
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
--
-- Darren Grey
-- http://gruesomegames.com

newEntity{
    define_as = "WEAPON",
    slot = "WEAPON",
    type = "sword",
    display = ")", color=colors.WHITE,
    --rarity = 8,
	level_range = {1, 100},
    encumber = 0,
	desc = [[A cool weapon.]],
}

--[[newEntity{ base = "WEAPON",
    name = "Mop",
	rarity = 5,
    wielder = {
        power = 1,
		speed = 1,
		aim = 1,
		dodge = 1,
		armour = 1,
		
		-- jumping = 1,
		-- vampiric = 1,
		-- can_invis = 1,
		-- life_regen = 1,
		-- return_damage = 1,
    },
	
	
	on_crit = { name = "Super Splash", use = function(self,target)
		
		
		return
	end},
}--]]


newEntity{
	define_as = "BASE_SCROLL",
	type = "scroll",
    name = "scroll of suppress memories",
    display = "!",
    level_range = {1, 50},
	color = colors.RED,
    encumber = 0,
	rarity = 3,
	stacking = true,
	desc = [[A magical scroll guaranteed to repair all harm!]],
	
    use_simple = { name = "restore 15 Sanity", use = function(self, who)
		game.logSeen(who, "#ee1111#You read the scroll.  Your mind feels totally refreshed!")
		local diff = who.max_life - who.life
		if diff > 15 then diff = 15 end
		who.life = who.life + diff
		--game.flyers:add(game.player.x, game.player.y, 30, (rng.range(0,2)-1) * 0.5, -3, tostring(-math.ceil(diff)), {240,150,150})
		
		return {used=true, destroy=true}
	end},
}

